3.59 \(\int \frac{A+B x+C x^2}{\sqrt{a+b x} \sqrt{a c-b c x} (e+f x)^2} \, dx\)

Optimal. Leaf size=322 \[ \frac{f \left (a^2-b^2 x^2\right ) \left (A+\frac{e (C e-B f)}{f^2}\right )}{\sqrt{a+b x} (e+f x) \sqrt{a c-b c x} \left (b^2 e^2-a^2 f^2\right )}+\frac{\sqrt{a^2 c-b^2 c x^2} \left (a^2 f^2 (2 C e-B f)-b^2 \left (C e^3-A e f^2\right )\right ) \tan ^{-1}\left (\frac{\sqrt{c} \left (a^2 f+b^2 e x\right )}{\sqrt{a^2 c-b^2 c x^2} \sqrt{b^2 e^2-a^2 f^2}}\right )}{\sqrt{c} f^2 \sqrt{a+b x} \sqrt{a c-b c x} \left (b^2 e^2-a^2 f^2\right )^{3/2}}+\frac{C \sqrt{a^2 c-b^2 c x^2} \tan ^{-1}\left (\frac{b \sqrt{c} x}{\sqrt{a^2 c-b^2 c x^2}}\right )}{b \sqrt{c} f^2 \sqrt{a+b x} \sqrt{a c-b c x}} \]

[Out]

(f*(A + (e*(C*e - B*f))/f^2)*(a^2 - b^2*x^2))/((b^2*e^2 - a^2*f^2)*Sqrt[a + b*x]
*Sqrt[a*c - b*c*x]*(e + f*x)) + (C*Sqrt[a^2*c - b^2*c*x^2]*ArcTan[(b*Sqrt[c]*x)/
Sqrt[a^2*c - b^2*c*x^2]])/(b*Sqrt[c]*f^2*Sqrt[a + b*x]*Sqrt[a*c - b*c*x]) + ((a^
2*f^2*(2*C*e - B*f) - b^2*(C*e^3 - A*e*f^2))*Sqrt[a^2*c - b^2*c*x^2]*ArcTan[(Sqr
t[c]*(a^2*f + b^2*e*x))/(Sqrt[b^2*e^2 - a^2*f^2]*Sqrt[a^2*c - b^2*c*x^2])])/(Sqr
t[c]*f^2*(b^2*e^2 - a^2*f^2)^(3/2)*Sqrt[a + b*x]*Sqrt[a*c - b*c*x])

_______________________________________________________________________________________

Rubi [A]  time = 1.13756, antiderivative size = 322, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 40, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.175 \[ \frac{f \left (a^2-b^2 x^2\right ) \left (A+\frac{e (C e-B f)}{f^2}\right )}{\sqrt{a+b x} (e+f x) \sqrt{a c-b c x} \left (b^2 e^2-a^2 f^2\right )}+\frac{\sqrt{a^2 c-b^2 c x^2} \left (a^2 f^2 (2 C e-B f)-b^2 \left (C e^3-A e f^2\right )\right ) \tan ^{-1}\left (\frac{\sqrt{c} \left (a^2 f+b^2 e x\right )}{\sqrt{a^2 c-b^2 c x^2} \sqrt{b^2 e^2-a^2 f^2}}\right )}{\sqrt{c} f^2 \sqrt{a+b x} \sqrt{a c-b c x} \left (b^2 e^2-a^2 f^2\right )^{3/2}}+\frac{C \sqrt{a^2 c-b^2 c x^2} \tan ^{-1}\left (\frac{b \sqrt{c} x}{\sqrt{a^2 c-b^2 c x^2}}\right )}{b \sqrt{c} f^2 \sqrt{a+b x} \sqrt{a c-b c x}} \]

Antiderivative was successfully verified.

[In]  Int[(A + B*x + C*x^2)/(Sqrt[a + b*x]*Sqrt[a*c - b*c*x]*(e + f*x)^2),x]

[Out]

(f*(A + (e*(C*e - B*f))/f^2)*(a^2 - b^2*x^2))/((b^2*e^2 - a^2*f^2)*Sqrt[a + b*x]
*Sqrt[a*c - b*c*x]*(e + f*x)) + (C*Sqrt[a^2*c - b^2*c*x^2]*ArcTan[(b*Sqrt[c]*x)/
Sqrt[a^2*c - b^2*c*x^2]])/(b*Sqrt[c]*f^2*Sqrt[a + b*x]*Sqrt[a*c - b*c*x]) + ((a^
2*f^2*(2*C*e - B*f) - b^2*(C*e^3 - A*e*f^2))*Sqrt[a^2*c - b^2*c*x^2]*ArcTan[(Sqr
t[c]*(a^2*f + b^2*e*x))/(Sqrt[b^2*e^2 - a^2*f^2]*Sqrt[a^2*c - b^2*c*x^2])])/(Sqr
t[c]*f^2*(b^2*e^2 - a^2*f^2)^(3/2)*Sqrt[a + b*x]*Sqrt[a*c - b*c*x])

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 126.292, size = 282, normalized size = 0.88 \[ - \frac{2 C \operatorname{atan}{\left (\frac{\sqrt{a c - b c x}}{\sqrt{c} \sqrt{a + b x}} \right )}}{b \sqrt{c} f^{2}} + \frac{2 b^{2} e \left (A f^{2} - B e f + C e^{2}\right ) \operatorname{atanh}{\left (\frac{\sqrt{c} \sqrt{a + b x} \sqrt{a f + b e}}{\sqrt{a c - b c x} \sqrt{a f - b e}} \right )}}{\sqrt{c} f^{2} \left (a f - b e\right )^{\frac{3}{2}} \left (a f + b e\right )^{\frac{3}{2}}} - \frac{\sqrt{a + b x} \sqrt{a c - b c x} \left (A f^{2} - B e f + C e^{2}\right )}{c f \left (e + f x\right ) \left (a f - b e\right ) \left (a f + b e\right )} - \frac{2 \left (B f - 2 C e\right ) \operatorname{atanh}{\left (\frac{\sqrt{c} \sqrt{a + b x} \sqrt{a f + b e}}{\sqrt{a c - b c x} \sqrt{a f - b e}} \right )}}{\sqrt{c} f^{2} \sqrt{a f - b e} \sqrt{a f + b e}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((C*x**2+B*x+A)/(f*x+e)**2/(b*x+a)**(1/2)/(-b*c*x+a*c)**(1/2),x)

[Out]

-2*C*atan(sqrt(a*c - b*c*x)/(sqrt(c)*sqrt(a + b*x)))/(b*sqrt(c)*f**2) + 2*b**2*e
*(A*f**2 - B*e*f + C*e**2)*atanh(sqrt(c)*sqrt(a + b*x)*sqrt(a*f + b*e)/(sqrt(a*c
 - b*c*x)*sqrt(a*f - b*e)))/(sqrt(c)*f**2*(a*f - b*e)**(3/2)*(a*f + b*e)**(3/2))
 - sqrt(a + b*x)*sqrt(a*c - b*c*x)*(A*f**2 - B*e*f + C*e**2)/(c*f*(e + f*x)*(a*f
 - b*e)*(a*f + b*e)) - 2*(B*f - 2*C*e)*atanh(sqrt(c)*sqrt(a + b*x)*sqrt(a*f + b*
e)/(sqrt(a*c - b*c*x)*sqrt(a*f - b*e)))/(sqrt(c)*f**2*sqrt(a*f - b*e)*sqrt(a*f +
 b*e))

_______________________________________________________________________________________

Mathematica [A]  time = 1.13075, size = 340, normalized size = 1.06 \[ \frac{\frac{f \sqrt{a+b x} (b x-a) \left (f (A f-B e)+C e^2\right )}{(e+f x) \left (a^2 f^2-b^2 e^2\right )}-\frac{\sqrt{a-b x} \log (e+f x) \left (a^2 f^2 (B f-2 C e)+b^2 \left (C e^3-A e f^2\right )\right )}{(b e-a f) (a f+b e) \sqrt{a^2 f^2-b^2 e^2}}+\frac{\sqrt{a-b x} \log \left (\sqrt{a-b x} \sqrt{a+b x} \sqrt{a^2 f^2-b^2 e^2}+a^2 f+b^2 e x\right ) \left (a^2 f^2 (B f-2 C e)+b^2 \left (C e^3-A e f^2\right )\right )}{(b e-a f) (a f+b e) \sqrt{a^2 f^2-b^2 e^2}}+\frac{C \sqrt{a-b x} \tan ^{-1}\left (\frac{b x}{\sqrt{a-b x} \sqrt{a+b x}}\right )}{b}}{f^2 \sqrt{c (a-b x)}} \]

Antiderivative was successfully verified.

[In]  Integrate[(A + B*x + C*x^2)/(Sqrt[a + b*x]*Sqrt[a*c - b*c*x]*(e + f*x)^2),x]

[Out]

((f*(C*e^2 + f*(-(B*e) + A*f))*(-a + b*x)*Sqrt[a + b*x])/((-(b^2*e^2) + a^2*f^2)
*(e + f*x)) + (C*Sqrt[a - b*x]*ArcTan[(b*x)/(Sqrt[a - b*x]*Sqrt[a + b*x])])/b -
((a^2*f^2*(-2*C*e + B*f) + b^2*(C*e^3 - A*e*f^2))*Sqrt[a - b*x]*Log[e + f*x])/((
b*e - a*f)*(b*e + a*f)*Sqrt[-(b^2*e^2) + a^2*f^2]) + ((a^2*f^2*(-2*C*e + B*f) +
b^2*(C*e^3 - A*e*f^2))*Sqrt[a - b*x]*Log[a^2*f + b^2*e*x + Sqrt[-(b^2*e^2) + a^2
*f^2]*Sqrt[a - b*x]*Sqrt[a + b*x]])/((b*e - a*f)*(b*e + a*f)*Sqrt[-(b^2*e^2) + a
^2*f^2]))/(f^2*Sqrt[c*(a - b*x)])

_______________________________________________________________________________________

Maple [B]  time = 0.066, size = 1200, normalized size = 3.7 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((C*x^2+B*x+A)/(f*x+e)^2/(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2),x)

[Out]

(A*ln(2*(b^2*c*e*x+a^2*c*f+(-c*(b^2*x^2-a^2))^(1/2)*(c*(a^2*f^2-b^2*e^2)/f^2)^(1
/2)*f)/(f*x+e))*x*b^2*c*e*f^3*(b^2*c)^(1/2)-B*ln(2*(b^2*c*e*x+a^2*c*f+(-c*(b^2*x
^2-a^2))^(1/2)*(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)*f)/(f*x+e))*x*a^2*c*f^4*(b^2*c)^(
1/2)+C*arctan((b^2*c)^(1/2)*x/(-c*(b^2*x^2-a^2))^(1/2))*x*a^2*c*f^4*(c*(a^2*f^2-
b^2*e^2)/f^2)^(1/2)-C*arctan((b^2*c)^(1/2)*x/(-c*(b^2*x^2-a^2))^(1/2))*x*b^2*c*e
^2*f^2*(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)+2*C*ln(2*(b^2*c*e*x+a^2*c*f+(-c*(b^2*x^2-
a^2))^(1/2)*(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)*f)/(f*x+e))*x*a^2*c*e*f^3*(b^2*c)^(1
/2)-C*ln(2*(b^2*c*e*x+a^2*c*f+(-c*(b^2*x^2-a^2))^(1/2)*(c*(a^2*f^2-b^2*e^2)/f^2)
^(1/2)*f)/(f*x+e))*x*b^2*c*e^3*f*(b^2*c)^(1/2)+A*ln(2*(b^2*c*e*x+a^2*c*f+(-c*(b^
2*x^2-a^2))^(1/2)*(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)*f)/(f*x+e))*b^2*c*e^2*f^2*(b^2
*c)^(1/2)-B*ln(2*(b^2*c*e*x+a^2*c*f+(-c*(b^2*x^2-a^2))^(1/2)*(c*(a^2*f^2-b^2*e^2
)/f^2)^(1/2)*f)/(f*x+e))*a^2*c*e*f^3*(b^2*c)^(1/2)+C*arctan((b^2*c)^(1/2)*x/(-c*
(b^2*x^2-a^2))^(1/2))*a^2*c*e*f^3*(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)-C*arctan((b^2*
c)^(1/2)*x/(-c*(b^2*x^2-a^2))^(1/2))*b^2*c*e^3*f*(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)
+2*C*ln(2*(b^2*c*e*x+a^2*c*f+(-c*(b^2*x^2-a^2))^(1/2)*(c*(a^2*f^2-b^2*e^2)/f^2)^
(1/2)*f)/(f*x+e))*a^2*c*e^2*f^2*(b^2*c)^(1/2)-C*ln(2*(b^2*c*e*x+a^2*c*f+(-c*(b^2
*x^2-a^2))^(1/2)*(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)*f)/(f*x+e))*b^2*c*e^4*(b^2*c)^(
1/2)-A*f^4*(-c*(b^2*x^2-a^2))^(1/2)*(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)*(b^2*c)^(1/2
)+B*e*f^3*(-c*(b^2*x^2-a^2))^(1/2)*(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)*(b^2*c)^(1/2)
-C*e^2*f^2*(-c*(b^2*x^2-a^2))^(1/2)*(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)*(b^2*c)^(1/2
))/c*(-c*(b*x-a))^(1/2)*(b*x+a)^(1/2)/(-c*(b^2*x^2-a^2))^(1/2)/(a*f+b*e)/(a*f-b*
e)/(f*x+e)/f^3/(b^2*c)^(1/2)/(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)/(sqrt(-b*c*x + a*c)*sqrt(b*x + a)*(f*x + e)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)/(sqrt(-b*c*x + a*c)*sqrt(b*x + a)*(f*x + e)^2),x, algorithm="fricas")

[Out]

Timed out

_______________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x**2+B*x+A)/(f*x+e)**2/(b*x+a)**(1/2)/(-b*c*x+a*c)**(1/2),x)

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.600939, size = 4, normalized size = 0.01 \[ \mathit{sage}_{0} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)/(sqrt(-b*c*x + a*c)*sqrt(b*x + a)*(f*x + e)^2),x, algorithm="giac")

[Out]

sage0*x